﻿
namespace School.Web
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Data.Objects.DataClasses;
    using System.Linq;
    using System.ServiceModel.DomainServices.Hosting;
    using System.ServiceModel.DomainServices.Server;


    // The MetadataTypeAttribute identifies ApplicantMetadata as the class
    // that carries additional metadata for the Applicant class.
    [MetadataTypeAttribute(typeof(Applicant.ApplicantMetadata))]
    public partial class Applicant
    {

        // This class allows you to attach custom attributes to properties
        // of the Applicant class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class ApplicantMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private ApplicantMetadata()
            {
            }

            public int ApllicantId { get; set; }

            public Cours Cours { get; set; }

            public int CourseId { get; set; }

            public string Name { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies CategoryMetadata as the class
    // that carries additional metadata for the Category class.
    [MetadataTypeAttribute(typeof(Category.CategoryMetadata))]
    public partial class Category
    {

        // This class allows you to attach custom attributes to properties
        // of the Category class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class CategoryMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private CategoryMetadata()
            {
            }

            public int CategoryId { get; set; }

            public string CategoryName { get; set; }

            [Include]
            public EntityCollection<Cours> Courses { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies CoursMetadata as the class
    // that carries additional metadata for the Cours class.
    [MetadataTypeAttribute(typeof(Cours.CoursMetadata))]
    public partial class Cours
    {

        // This class allows you to attach custom attributes to properties
        // of the Cours class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class CoursMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private CoursMetadata()
            {
            }

            public EntityCollection<Applicant> Applicants { get; set; }

            public Category Category { get; set; }

            public int CategoryId { get; set; }

            public string CourseDescription { get; set; }

            public int CourseId { get; set; }

            public string CourseName { get; set; }
        }
    }
}
